home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
ShareMailGiftware
/
AmigaTalk
/
user
/
PicComplexExample.st
< prev
next >
Wrap
Text File
|
2002-10-27
|
2KB
|
58 lines
" ------------------------------------------------------------------ "
" DisplayPic.st - Display a graphic file using the DataType classes. "
" ------------------------------------------------------------------ "
Class DisplayPic :Object
!
dtLibrary modeID objName intuition dtSystem logoPic dtAttrs
dtoTags dto
!
[
new
dtLibrary <- Library new: 'datatypes.library'
dtLibrary openVersion: 44
modeID <- 0
objName <- String new: 80
intuition <- Intuition new
dtSystem <- DataTypeSystem new
logoPic <- DataType new
dtAttrs <- Array new: 5
dtoTags <- Array new: 7
dtAttrs at: 1 put: (dtSystem getDTClassTag: #DTA_ObjName)
dtAttrs at: 2 put: (amigatalk getStringAddress: objName)
dtAttrs at: 3 put: (dtSystem getDTPictureTag: #PDTA_ModeID)
dtAttrs at: 4 put: (amigatalk getIntegerAddress: modeID)
dtAttrs at: 5 put: 0
dtoTags at: 1 put: (intuition getGadgetAttr: #GA_Relverify)
dtoTags at: 2 put: 1
dtoTags at: 3 put: (intuition getGadgetAttr: #GA_Immediate)
dtoTags at: 4 put: 1
dtoTags at: 5 put: (dtSystem getDTClassTag: #DTA_DataType)
dtoTags at: 6 put: 0
dtoTags at: 7 put: 0
|
cleanup
dto disposeDTObject.
dtLibrary close
|
viewPic: filename
self new.
dto <- logoPic newDTObject: filename tags: dtoTags.
(dto == nil)
ifTrue: [ logoPic translateDTErrorNum print.
^ nil
].
dto getDTAttrs: dtAttrs
...
self cleanup
]